﻿--header CommentReadModel
if (exists(
select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'iComply'
and TABLE_NAME='CommentReadModel'))
BEGIN
Drop table iComply.CommentReadModel
END

GO

CREATE TABLE iComply.CommentReadModel(
Id uniqueidentifier NOT NULL,
[Time] DateTime2 NOT NULL,
LastEdited DateTime2 NOT NULL,
[Text] nvarchar(max) NOT NULL,
AuthorId int NOT NULL,
AssignmentId uniqueidentifier NOT NULL,
AuthorName nvarchar(max) NOT NULL,
UploadsData nvarchar(max) NOT NULL,
CONSTRAINT PK_CommentReadModel PRIMARY KEY (Id)
)